﻿// ===============================================================================
// DotNet.Platform 开发框架 2016 版权所有
// ===============================================================================

using System;
using DotNet.Entity;
using System.ComponentModel.DataAnnotations;

namespace DotNet.JCore.Entity
{
    /// <summary>
    /// 稽查点管理
    /// </summary>
    [Table("稽查点管理")]    
    public class CheckPoints
    {
		/// <summary>
        /// 主键
        /// </summary>
        [PrimaryKey]
        [Column("主键",false)]
        public string Id { get; set; }

		/// <summary>
        /// 名称
        /// </summary>
		[Column("名称")]
        [Required(ErrorMessage = "请输入稽查点名称")]
        [MaxLength(100, ErrorMessage = "稽查点名称长度不能超过{0}个字符")]
        public string Name { get; set; }

		/// <summary>
        /// 编号
        /// </summary>
		[Column("编号")]
        [Required(ErrorMessage = "请输入稽查点编号")]
        [MaxLength(50, ErrorMessage = "稽查点编号长度不能超过{0}个字符")]
        public string Number { get; set; }

		/// <summary>
        /// 地址
        /// </summary>
		[Column("地址")]
        [MaxLength(200, ErrorMessage = "稽查点地址长度不能超过{0}个字符")]
        public string Addr { get; set; }


        /// <summary>
        /// 有效 0无效 1有效
        /// </summary>
        [Column("有效", false)]
        public bool Enabled { get; set; } = true;

        /// <summary>
        /// 有效状态 0无效 1有效
        /// </summary>
        [Ignore]
        [Column("状态")]
        public string EnabledText
        {
            get { return Enabled ? "有效" : "无效"; }
        }


        /// <summary>
        /// 创建用户主键
        /// </summary>
        [Column("创建用户主键")]
        public string CreateId { get; set; }

		/// <summary>
        /// 创建用户姓名
        /// </summary>
		[Column("创建用户姓名")]
        public string CreateName { get; set; }

		/// <summary>
        /// 创建时间
        /// </summary>
		[Column("创建时间")]
        public DateTime? CreateTime { get; set; }

		/// <summary>
        /// 修改用户主键
        /// </summary>
		[Column("修改用户主键")]
        public string ModifyId { get; set; }

		/// <summary>
        /// 修改用户姓名
        /// </summary>
		[Column("修改用户姓名")]
        public string ModifyName { get; set; }

		/// <summary>
        /// 修改时间
        /// </summary>
		[Column("修改时间")]
        public DateTime? ModifyTime { get; set; }

		/// <summary>
        /// 备注
        /// </summary>
		[Column("备注")]
        public string Note { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public CheckPoints Clone()
        {
            return (CheckPoints)MemberwiseClone();
        }
    }
}
